<template>
  <el-form :inline="true" :model="form" class="demo-form-inline">
    <el-form-item label="项目名称">
      <el-input v-model="form.name" placeholder="项目名称"></el-input>
    </el-form-item>

    <el-form-item label="立项人">
      <el-input v-model="form.created_user" placeholder="立项人"></el-input>
    </el-form-item>

    <el-form-item label="流水号">
      <el-input v-model="form.batch_id" placeholder="流水号"></el-input>
    </el-form-item>

    <el-form-item label="审批状态">
      <el-select v-model="form.status" placeholder="审批状态" @change="onSubmit">

        <el-option :label="status" :value="k" v-for="(status,k) in status_list" :key="k"></el-option>

      </el-select>
    </el-form-item>

    <el-form-item label="项目时间">
      <el-date-picker
        v-model="form.date"
        type="daterange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        value-format="yyyy-MM-dd"
      >
      </el-date-picker>
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
    export default {
        name: "project_query",
        data(){
            return {
                status_list: ['备审','待审','已审'],
            }
        },
        props:['form'],
        methods:{
            onSubmit(){
                this.$emit('query',this.form)
            }
        },
    }
</script>

<style scoped>

</style>
